import sys
import re

def count_zifu(file_path):
    with open(file_path, 'r',encoding='utf-8') as file:
        return len(file.read())

def count_words(file_path):
    with open(file_path, 'r',encoding='utf-8') as file:
        text = file.read()
        words = re.findall(r'\b\w+\b', text)
        return len(words)

def count_sentences(file_path):
    with open(file_path, 'r',encoding='utf-8') as file:
        text = file.read()
        sentences = re.split(r'[.!?]\s*', text)
        return len(sentences) - sentences.count('')

def main():
    if len(sys.argv) < 3:
        print("Usage: wc.exe [-c|-w|-s] file.txt")
        return

    command = sys.argv[1]
    file_path = sys.argv[2]

    if command == '-c':
        print(f"Character count: {count_zifu(file_path)}")
    elif command == '-w':
        print(f"Word count: {count_words(file_path)}")
    elif command == '-s':
        print(f"Sentence count: {count_sentences(file_path)}")

if __name__ == "__main__":
    main()